package com.ruoyi.mymod.service.impl;

import com.ruoyi.mymod.service.IChickenService;
import com.ruoyi.mymod.service.IDrawerService;
import com.ruoyi.mymod.utils.Dbutil;
import com.ruoyi.mymod.utils.Dbutil.Qp;
import org.springframework.stereotype.Service;

@Service
public class DrawerServiceImpl implements IDrawerService {


    @Override
    public String getData(String type) {
        Dbutil.R r=null;
        Qp qp=null;
        try {
            qp = new Qp();
            String sql="select * from WX_SOP_YFDATA order by id";
            if ("sow".equals(type)){
                sql="select * from WX_SOP_ZZDATA order by id";
            }else if ("fk".equals(type)){
                sql="select * from WX_SOP_FKDATA order by id";
            }
            Object o= qp.setUsrpwd("pigpos","pigpos").setSqlStr(sql).select();
            r=(Dbutil.R) o;

        }finally {
            qp.closeConn();
        }
        return r.json;
    }
}
